/**
 * related to mainCategory.ui
 * 
 * @Author : chenglm
 * @Timestamp : 2016-08-22
 */
var root=ui("$");
var nf = sm("do_Notification");
var common = require("common");
var homemakingUtil = require("url/homemaking");
var layoutRoot = ui("layoutRoot");
var do_ALayout_jdwx = ui("do_ALayout_jdwx");
var do_ALayout_jdqx = ui("do_ALayout_jdqx");
var do_ALayout_rcbj = ui("do_ALayout_rcbj");
var typeALayouts = [do_ALayout_jdwx,do_ALayout_jdqx,do_ALayout_rcbj];
var firstTypeId = '',typeId = '';

//进入分类列表
typeALayouts.forEach(function(dc,i){
	dc.on("touch", function() {
		if(dc.tag == '17') {
			common.open("source://view/homemaking/base/gridType.ui", {"firstTypeId" : homemakingUtil.typeId.JiaDianWeiXiu});
		} else {
			var typeIds = dc.tag.split("-");
			firstTypeId = typeIds[0];
			if (typeIds.length == 1) {
				typeId = "";
			} else {
				typeId = typeIds[1];
			}
			common.open("source://view/homemaking/base/listType.ui", {"firstTypeId" : firstTypeId});
		}
	});
});
